import common from './common'
const paths = {
  getAllInvestmentItemList: 'investment/item/getAllInvestmentItemList',
  getInvestmentItemFormList: 'investment/item/getInvestmentItemFormList',
  updateItemFormEncrypt: 'investment/item/updateItemFormEncrypt',
  listInvestmentItemSystemForm: 'investment/item/listInvestmentItemSystemForm',
  setJSGCGHXKXXB: 'online/flow/setJSGCGHXKXXB', // 写入工程规划许可信息
  setJSYDGHXKXXB: 'online/flow/setJSYDGHXKXXB' // 写入建设用地规划许可信息
}
const service = {};
(function (service) {
  service.getAllInvestmentItemList = (params) => {
    return common.get(paths.getAllInvestmentItemList, params)
  }

  service.getInvestmentItemFormList = (itemCode, category, source) => {
    return common.get(paths.getInvestmentItemFormList, { itemCode, category, source })
  }

  service.updateItemFormEncrypt = (data) => {
    return common.post(paths.updateItemFormEncrypt, {}, data)
  }

  service.listInvestmentItemSystemForm = (params) => {
    return common.get(paths.listInvestmentItemSystemForm, params)
  }
  service.setJSGCGHXKXXB = (projectId) => {
    return common.get(paths.setJSGCGHXKXXB, { projectId })
  }
  service.setJSYDGHXKXXB = (projectId) => {
    return common.get(paths.setJSYDGHXKXXB, { projectId })
  }
})(service)

export default service
